
const filledArray = require('filled-array');
console.log(filledArray(6))
var range = require('array-range')
console.log(range(1, 6))
console.log(range(6))


console.log('-----------------------\n')

// +++++++++++++++++  Array.prototype.reduce +++++++++++++++++  
var ret = range(1, 6).reduce((obj, ele) => {
	console.log(obj)
	
	if(ele % 2 === 0) {
		return obj 
	} else {
		if(obj[ele]) {
			obj[ele] ++
		} else {
			obj[ele] = 1
		}
		return obj 
	}
}, {})

console.log(ret)



